
if &compatible
    set nocompatible
end

filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

" ------------- 插件列表begin --------------
"此参数为vundle管理插件，必须安装
Bundle 'gmarik/vundle'  
"配色插件
Bundle "tomasr/molokai"  
"目录树插件
Bundle "scrooloose/nerdtree"
"状态行
Bundle "bling/vim-airline"
Bundle 'vim-airline/vim-airline-themes'
"代码格式化
Bundle 'Chiel92/vim-autoformat'
"Bundle "vimcn/vimcdoc"
"注释插件
"Bundle "scrooloose/nerdcommenter"
"代码缩进
"Bundle "nathanaelkane/vim-indent-guides"
"模糊搜索文件
"Bundle "kien/ctrlp.vim"




" ----------- 插件列表end --------------

filetype plugin indent on




"------------ nerdtree ------- 
let NERDChristmasTree=0
let NERDTreeWinSize=35
let NERDTreeChDirMode=2
let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$']
let NERDTreeShowBookmarks=1
let NERDTreeWinPos="left"
let g:nerdtree_tabs_open_on_gui_startup=1
let g:nerdtree_tabs_open_on_console_startup=1
" autocmd vimenter * NERDTree   " 默认开启
autocmd vimenter * if !argc() | NERDTree | endif " Automatically open a NERDTree if no files where specified
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif  " 只剩下目录树窗口时自动退出
nnoremap <space>a :NERDTreeToggle<cr>  " 设置f5为启用与关闭目录树插件按钮，默认开启

"------------ molokai ------- 
if filereadable(expand("~/.vim/bundle/molokai/colors/molokai.vim"))
  syntax enable
  syntax on
  set t_Co=256
  set background=dark
  colorscheme molokai
  highlight NonText guibg=#060606
  highlight Folded  guibg=#0A0A0A guifg=#9090D0
endif


"------------ airline ------- 
let g:airline#extensions#tabline#enabled=1 "顶部tab显示"
let g:airline_theme='molokai'  " murmur配色也不错


" ------------ vim-indent-guides -------
" 随 vim 自启动
"let g:indent_guides_enable_on_vim_startup=1
 "从第二层开始可视化显示缩进
"let g:indent_guides_start_level=1
"色块宽度
"let g:indent_guides_guide_size=1

" ------------ ctrlp.vim -------
"let g:ctrlp_map='<leader>ff'
"let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:20'
"let g:NERDTreeChDirMode = 2
"let g:ctrlp_working_path_mode = 'rw'

" ------------ autoformat -------
noremap <leader>f :Autoformat<CR>
